package com.gzx.tjzy.feign;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.common.consts.FeignConstant;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

@FeignClient(name = FeignConstant.BIZ_APP, contextId = "TjzyFileFeign")
public interface GzxFileFeign {

    @RequestMapping(value = "/feign/tjzy/file/get",
            produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
    byte[] getFile(@RequestParam String fileName);

    @RequestMapping(value = "/feign/tjzy/file/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public String upload(@RequestPart("file") MultipartFile file) throws IOException;

}
